/**
 * Copyright (c) 2011 Tomi Paananen.
 *
 * Part of Quick Gestures test tool.
 */

#ifndef QGTESTTOOL_H
#define QGTESTTOOL_H

// Qt includes
#include <QDir>
#include <QList>
#include <QObject>
#include <QString>

// Forward declarations
class FeatureExtractor;
class Gesture;
class SimpleClassifier;
class Statistics;
class StorageManager;


class QGTestTool : public QObject
{
    Q_OBJECT

public:
    explicit QGTestTool(int argc, char *argv[], QObject *parent = 0);
    virtual ~QGTestTool();

private:
    bool processArguments(int argc, char *argv[]);
    void printHelpText(char *arg0) const;
    void startTest();
    void examine();
    int loadGestureSet(const QString &path, QList<Gesture*> &gestureSet);
    void setParameters(int pointCount, quint32 scaleFactor);
    void copyGestureSet(QList<Gesture*> &sourceSet, QList<Gesture*> &destSet);
    void processGestureSet(QList<Gesture*> &gestureSet);
    void runTest(QList<Gesture*> &sampleSet, QList<Gesture*> &testSet,
                 const QString &testSetId);

private slots:
    void quit();

private: // Data
    SimpleClassifier *m_classifier; // Owned
    FeatureExtractor *m_featureExtractor; // Owned
    StorageManager *m_storageManager; // Owned
    Statistics *m_statistics; // Owned
    QDir m_testSetEntries;
    QString m_sampleSetFilename;
    QString m_testSetPath;
    int m_pointCounts[2];
    quint32 m_scaleFactors[2];
    bool m_examine;
};


#endif // QGTESTTOOL_H

// End of file.
